<%@page import="org.apache.shiro.authc.IncorrectCredentialsException"%>
	<%@page import="org.apache.shiro.authc.UnknownAccountException"%>
		<%@page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
			<%@page import="org.apache.shiro.authc.AuthenticationException"%>
				<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
					<%@ include file="/WEB-INF/views/jsp/pages/include/global.jsp" %>
						<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
						<html>

						<head>
							<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
							<title>系统登录</title>
							<link rel="stylesheet" type="text/css" href="${self.path.console}/css/login.css" />
						</head>

						<body>
							<div class="login">
								<div class="top">&nbsp;</div>
								<form id="loginForm" name="loginForm" method="post" action="" target="_top" onsubmit="return checkForm(this);">
									<div class="wrap">
										<p>
											<%
												String expMsg="";
												Object authExp = request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
												if(authExp!=null){
													if(authExp.equals("org.apache.shiro.authc.UnknownAccountException")){
														expMsg="账户不存在！";
													}else if(authExp.equals("org.apache.shiro.authc.IncorrectCredentialsException")){
														expMsg="账户密码错误！";
													}else if(authExp.equals("com.breeze.bms.shiro.VerifyCodeMatchException")){
														expMsg="验证码错误！";
													}else{
														expMsg="登录异常 :"+authExp ;
													}
												}
											 %>
												<center>
													<font color="red">
														<%=expMsg%>
													</font>
												</center>
										</p>
										<span> 用户名：<input type="text" name="username" id="username" maxlength="50" class="txt" value="" /></span>
										<span> 密&nbsp;&nbsp;&nbsp;&nbsp;码：<input type="password" name="password" id="password" maxlength="50" class="txt" /></span>
										<p></p>
										<p>
											<input type="submit" name="login" value="登录" class="btn" style="margin-left:18px;" />&nbsp;
											<input type="reset" name="reset" value="重置" class="btn" />
										</p>
									</div>
								</form>
								<div class="bottom">&nbsp;</div>

							</div>

							<script src="${self.path.lib}/jquery-1.11.1.min.js"></script>
							<script src="${self.path.console}/js/login.js"></script>
							<script language="javascript">
								$("input[name=username]").focus();
							</script>
						</body>

						</html>